#include "widget.h"
#include "ui_widget.h"
#include <QPushButton>
#include <QDebug>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

//    QPushButton* button = new QPushButton(this);
//    button->setText("hello");

//    qDebug()<< button->isEnabled();

//    button->setEnabled(0);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_clicked()
{
   qDebug()<<ui->label->isEnabled();
}

void Widget::on_pushButton_2_clicked()
{
    if(ui->label->isEnabled())
        ui->label->setEnabled(0);
    else
        ui->label->setEnabled(1);
}
